Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage utility: bumper
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
JasonRogers
n00b
n00b


Joined: 21 Jul 2004
Posts: 7

PostPosted: Tue Sep 14, 2004 12:30 pm    Post subject: Reply with quote

Thanks, that did it.
_________________
Jason Rogers

"I am crucified with Christ: nevertheless I live; yet not I, but Christ liveth in me: and the life which I now live in the flesh I live by the faith of the Son of God, who loved me, and gave himself for me."
Galatians 2:20
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Thu Feb 10, 2005 8:26 pm    Post subject: Reply with quote

bumper-0.0.10 is out

It will ask you if you want to edit the ebuild if the digest failed due to not guessing SRC_URI correctly or ask if you want to emerge the package if it downloaded and created digest.

http://dev.gentoo.org/~pythonhead/bumper/bumper-0.0.10
Back to top
View user's profile Send private message
jamapii
Guru
Guru


Joined: 16 Sep 2004
Posts: 574

PostPosted: Wed Apr 06, 2005 12:46 pm    Post subject: Reply with quote

To fix the KEYWORDS, if you don't want to run the file through a python loop, I suggest calling sed with something like:

Code:
sed -i -r -e '/^KEYWORDS=/s/([-_a-z0-9]+)/~\1/g' $new_ebuild_file
sed -i -r -e '/^KEYWORDS=/s/~~/~/g' $new_ebuild_file
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat Aug 13, 2005 7:04 pm    Post subject: Reply with quote

Pythonhead wrote:
floam wrote:
I think "0.0.4 - Changed delimiter for PORTDIR_OVERLAY from space to colon." was incorrect. While the portage documentation says a colon should be used, looking in the source shows that it actually uses a space to seperate multiple overlays. Trying to use colons will cause in an error:
Code:
( floam@Aluminium ~ ) emerge -puD world
!!! Invalid PORTDIR_OVERLAY (not a dir): /usr/local/overlays/personal/:/usr/local/overlays/public


Thanks, changed to space.


Actually, any whitespace will do; also, it is the last overlay which takes precedence, not the first. So it should be:
Code:

    PORTDIR_OVERLAY = env['PORTDIR_OVERLAY'].split()[-1]


Other than that, great!
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat Aug 13, 2005 7:18 pm    Post subject: Reply with quote

Some more thoughts: first, there's no particularly good reason why the category or old version should be required: the category can be got from a query, as can the version (it should be the highest installed version). Also, it should be OK to omit the new version; in that case the script should assume it to be the same as the old version.

Here's my changes, which seem to work:
Code:

--- bumper-0.0.10       2005-03-07 05:17:53.000000000 +0000
+++ bumper      2005-08-13 20:09:23.000000000 +0100
@@ -82,7 +82,7 @@ if os.getuid() != 0:
     print red("You must be root to run bumper.")
     sys.exit(1)

-if len(sys.argv) < 3:
+if len(sys.argv) < 2:
     print red("\nI need a category/package to bump up and a destination version.\n")
     print green("Example:")
     print "bumper games-arcade/pacman-1.0 2.0\n"
@@ -97,7 +97,7 @@ except:
 try:
     #In case people have multiple PORTDIR_OVERLAY directories, use first one.
     # See http://bugs.gentoo.org/show_bug.cgi?id=10803
-    PORTDIR_OVERLAY = env['PORTDIR_OVERLAY'].split(" ")[0]
+    PORTDIR_OVERLAY = env['PORTDIR_OVERLAY'].split()[-1]
 except:
     print red("ERROR: You must define PORTDIR_OVERLAY in your /etc/make.conf")
     print green("You can simply uncomment this line:")
@@ -106,9 +106,8 @@ except:
     sys.exit(1)

 def get_versions(query, new_version):
-    cat, pn, version, rev = gentoolkit.split_package_name(query)
     try:
-        pkg = gentoolkit.find_packages("=%s" % query)[0]
+        pkg = gentoolkit.find_packages("=%s" % query)[-1]
     except:
         print red("Error - Can't find ebuild for %s" % query)
         print green("\nGive the category and ebuild name in this format:")
@@ -121,12 +120,15 @@ def get_versions(query, new_version):
         print "bumper games-arcade/pacman-0.1 0.2"
         sys.exit(1)

+    cat, pn, version, rev = pkg._scpv
     ebuild_path = pkg.get_ebuild_path()
     filesdir = "%s/files" % pkg.get_package_path()
     # Is it an overlay version?
     overlay = pkg.is_overlay()
     if rev != "r0":
         version += "-" + rev
+    if not new_version:
+       new_version = version
     dest = ("%s/%s/%s/%s-%s.ebuild" % \
            (PORTDIR_OVERLAY, cat, pn, pn, new_version))
     if os.path.exists(dest):
@@ -182,7 +184,11 @@ def check_digest(dest, pn, new_version):
         return -1

 query = sys.argv[1]
-new_version = sys.argv[2]
+if len(sys.argv) > 2:
+    new_version = sys.argv[2]
+else:
+    new_version = None
+
 ebuild_path, dest, cat, pn, filesdir, overlay = get_versions(query, new_version)
 bump(ebuild_path, dest, filesdir, overlay)


_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sun Oct 02, 2005 6:42 am    Post subject: Reply with quote

ecatmur wrote:
Here's my changes, which seem to work:


works for me too - nice improvement :D
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
al3x_
n00b
n00b


Joined: 09 Jun 2006
Posts: 1

PostPosted: Fri Jun 09, 2006 10:11 pm    Post subject: small patch Reply with quote

For some reason bumper stopped working for me at some point.
It couldn't find PORTAGE_OVERLAY.
Code:

ERROR: You must define PORTDIR_OVERLAY in your /etc/make.conf
You can simply uncomment this line:
#PORTDIR_OVERLAY='/usr/local/portage'
Then: mkdir -p /usr/local/portage

Exception said "green takes 1 argument (2 supplied), so I have to modify it a bit.
Code:

--- bumper.old  2006-06-09 15:07:15.245812840 -0700
+++ bumper      2006-06-09 13:26:08.870645416 -0700
@@ -99,7 +99,7 @@
     #In case people have multiple PORTDIR_OVERLAY directories, use first one.
     # See http://bugs.gentoo.org/show_bug.cgi?id=10803
     PORTDIR_OVERLAY = env['PORTDIR_OVERLAY'].split()[-1]
-    print green("Your OVERLAY is: %s", PORTDIR_OVERLAY)
+    print green("Your OVERLAY is:" + PORTDIR_OVERLAY)
 except:
     print red("ERROR: You must define PORTDIR_OVERLAY in your /etc/make.conf")
     print green("You can simply uncomment this line:")

indents are important.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum