Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Portage utility: bumper

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
32 posts
  • 1
  • 2
  • Next
Author
Message
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

Portage utility: bumper

  • Quote

Post by Pythonhead » Sun Aug 03, 2003 4:18 am

I wrote a utility for portage named "bumper".

You notice that version 2.0 is out for your favorite software, but portage only has 1.0 (foobar-1.0.ebuild) and you want it now.

bumper will copy the 1.0 ebuild to your portage overlay directory, creating the necessary directories, and name it foobar-2.0.ebuild. It will then create a digest, which will also download the new package. It also copies any non-digest files in ${FILESDIR}.

Its a Python script you can get here:
http://dev.gentoo.org/~pythonhead/bumper/bumper-0.0.10

Usage:

Code: Select all

bumper app-games/pacman-1.0 2.0
Its also useful for simply copying an ebuild from your PORTDIR to your overlay (no version bump) for editing. Just use the same version number:

Code: Select all

bumper apps-foo/boo-1.0 1.0
Last edited by Pythonhead on Sun Mar 06, 2005 5:10 am, edited 12 times in total.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Sun Aug 03, 2003 3:28 pm

Moved from Portage & Programming.
Top
TheCoop
Veteran
Veteran
User avatar
Posts: 1814
Joined: Sat Jun 15, 2002 5:20 pm
Location: Where you least expect it
Contact:
Contact TheCoop
Website

  • Quote

Post by TheCoop » Sun Aug 03, 2003 3:39 pm

wouldnt it be better as a bash script?

ie:

Code: Select all

<get PORTAGE_OVERLAY from make.conf using some obsfusticated sed command>
cp $1 overlay/$2 etc /w name changes
ebuild <new ebuild> digest
emerge <ebuild>
why python?
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Top
AgenT
Apprentice
Apprentice
User avatar
Posts: 280
Joined: Sun May 18, 2003 4:17 pm

  • Quote

Post by AgenT » Sun Aug 03, 2003 3:46 pm

Neat! I think this calls for a request!
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Sun Aug 03, 2003 4:51 pm

TheCoop wrote:wouldnt it be better as a bash script?
What difference does the language matter as long as it works?

ie:

Code: Select all

<get PORTAGE_OVERLAY from make.conf using some obsfusticated sed command>
cp $1 overlay/$2 etc /w name changes
ebuild <new ebuild> digest
emerge <ebuild>
why python?
Well, thats nice pseudo-code, but my Python psudeo-code looked about the same before I actually wrote the finished code. Look at all the error checking in my code.

Why Python? It sounds better than "bash".

Write in in bash if it'll make you feel better.
Last edited by Pythonhead on Sun Aug 03, 2003 4:59 pm, edited 1 time in total.
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Sun Aug 03, 2003 4:58 pm

It kinda pukes with something like:

Code: Select all

bumper app-misc/blah-1.0.1-r1 blah-2.0
It trys to look in app-misc/blah-1.0.1/
Think about your breathing.
http://floam.sh.nu
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Sun Aug 03, 2003 5:20 pm

floam wrote:It kinda pukes with something like:

Code: Select all

bumper app-misc/blah-1.0.1-r1 blah-2.0
It trys to look in app-misc/blah-1.0.1/
Thanks Floam!

EDIT: Fixed in version 0.0.2, same link in first post.
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Mon Aug 04, 2003 1:44 am

Also gets messed up if people have multiple PORTDIR_OVERLAY's. In recent versions of portage it is legal to do a
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage2" or similar, which I happen to use. Could the script only use the first directory? Right now it dies with a Couldn't copy file error.
Think about your breathing.
http://floam.sh.nu
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Mon Aug 04, 2003 2:40 am

floam wrote:Also gets messed up if people have multiple PORTDIR_OVERLAY's. In recent versions of portage it is legal to do a
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage2" or similar, which I happen to use. Could the script only use the first directory? Right now it dies with a Couldn't copy file error.
Ok, thanks for the heads up. I didn't know you could use more than one PORTDIR_OVERLAY. It would be easy enough to fix it to check the first one, but let me read up on it and see why people would use two. Was this announced somewhere? I'd like to be a little more informed before I change it.

How does portage use it? Does the first one take precedence over the second?
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Mon Aug 04, 2003 4:54 am

PythonHead: You see a few mentions of it in the portage changelog. The first takes precidence. I use it because I have a script that does some weird stuff there to specific ebuilds and I don't want it affecting my real overlay. People could also use it to sync up with like the breakmygentoo.net development gnome stuff and able to keep it seperate, and stuff like that. It's a very little used feature.
Think about your breathing.
http://floam.sh.nu
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Mon Aug 04, 2003 6:17 am

floam wrote:PythonHead: You see a few mentions of it in the portage changelog. The first takes precidence. I use it because I have a script that does some weird stuff there to specific ebuilds and I don't want it affecting my real overlay. People could also use it to sync up with like the breakmygentoo.net development gnome stuff and able to keep it seperate, and stuff like that. It's a very little used feature.
Ok, good enough. I'll go update it to use the first one in the list.
Top
wizy
Tux's lil' helper
Tux's lil' helper
Posts: 133
Joined: Sun May 26, 2002 10:15 pm

nice

  • Quote

Post by wizy » Mon Aug 04, 2003 1:59 pm

This is great. I do this by hand a lot of the time, thank you.
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

Re: nice

  • Quote

Post by Pythonhead » Mon Aug 04, 2003 3:05 pm

wizy wrote:This is great. I do this by hand a lot of the time, thank you.
Thank you.

Version 0.3 is ready and fixes the multiple overlay directory bug, thanks Floam.

http://abeni.sourceforge.net/ebuilds/bumper-0.3
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Wed Aug 06, 2003 5:47 am

Thanks! Works almost great now :) One more suggestion, since many ebuilds have patches and stuff they need in the /files/ dir, maybe you should copy that over to overlay as well?
Think about your breathing.
http://floam.sh.nu
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Wed Aug 06, 2003 5:55 am

floam wrote:Thanks! Works almost great now :) One more suggestion, since many ebuilds have patches and stuff they need in the /files/ dir, maybe you should copy that over to overlay as well?
Ok, I'll test that out. I'm not sure how well that will work since the names of patches are tied to the version number. It'd be some trick to guess the patch names, since there isn't a standard. If it doesn't work out, I'll have a message showing the files that were copied that aren't digests.

Thanks for the suggestion.
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Wed Aug 06, 2003 6:39 am

Yeah, you can't really be sure itll always work, but just moving /files/ over and then basically s/oldversion/newversion/'ing all the filenames seems like it would work a good percent of the time.
Think about your breathing.
http://floam.sh.nu
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Sun Aug 17, 2003 6:48 am

Bumper 0.4 is ready for testing:

From the ChangeLog:

- Changed delimiter for PORTDIR_OVERLAY from space to colon.
http://bugs.gentoo.org/show_bug.cgi?id=10803
http://bugs.gentoo.org/show_bug.cgi?id=26773
- Copy non-digest files from ${FILESDIR}
- More error checking for env vars, warn and exit if no PORTDIR_OVERLAY
- Exits if user isn't root
Top
asph
l33t
l33t
User avatar
Posts: 741
Joined: Mon Aug 25, 2003 8:52 am
Location: Barcelona, Spain

nice

  • Quote

Post by asph » Wed Sep 03, 2003 7:18 am

pythonhead rules!
thanks, nice app :D (also for learning python)
gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Sat Oct 25, 2003 3:43 am

Code: Select all

( floam  ~ ) bumper enchant-1.0.0 enchant-1.1.1
Traceback (most recent call last):
  File "/usr/bin/bumper", line 99, in ?
    cat, p = ebuild_from.split("/")
ValueError: unpack list of wrong size
Think about your breathing.
http://floam.sh.nu
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Sat Oct 25, 2003 3:52 am

floam wrote:

Code: Select all

( floam  ~ ) bumper enchant-1.0.0 enchant-1.1.1
Traceback (most recent call last):
  File "/usr/bin/bumper", line 99, in ?
    cat, p = ebuild_from.split("/")
ValueError: unpack list of wrong size
You should be using this instead:

Code: Select all

bumper app-text/enchant-1.0.0 enchant-1.1.1
I'll fix it so it shows the usage message though, thanks.
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Tue Jun 15, 2004 2:14 am

Version 0.5 is out and works with newer versions of portage. The code is cleaned up a bit thanks to the use of gentoolkit.py now.

EDIT
0.6 is ready for testing due to major problem in 0.5:

http://dev.gentoo.org/~pythonhead/bumper-0.6
Top
floam
Veteran
Veteran
Posts: 1067
Joined: Sun Oct 27, 2002 2:55 am
Location: Vancouver, WA USA
Contact:
Contact floam
Website

  • Quote

Post by floam » Sun Jun 27, 2004 11:01 pm

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: Select all

( floam@Aluminium ~ ) emerge -puD world
!!! Invalid PORTDIR_OVERLAY (not a dir): /usr/local/overlays/personal/:/usr/local/overlays/public
Think about your breathing.
http://floam.sh.nu
Top
JasonRogers
n00b
n00b
Posts: 7
Joined: Wed Jul 21, 2004 1:00 pm

problems with 0.6

  • Quote

Post by JasonRogers » Wed Jul 21, 2004 1:11 pm

2 problems actually.
First, I had to change line#53

Code: Select all

+++ l = os.listdir(package_path)
--- l = os.listdir(pacakge_path)
Second, I get this error trying to bump resin-2.1.9 which is located in net-www/resin

Code: Select all

# bumper net-www/resin-2.1.9 3.0.8
!!! aux_get(): ebuild for 'net-www/resin-resin-3.0.8' does not exist at:
!!!            /usr/portage/net-www/resin-resin/resin-resin-3.0.8.ebuild
Error - Can't find ebuild for net-www/resin-2.1.9

Give the category and ebuild name in this format:
bumper games-arcade/pacman-0.1 0.2
So I thought that perhaps I need to just use 'resin' instead of 'resin-2.1.9', but then I get this error.

Code: Select all

eanus resin # bumper net-www/resin 3.0.8
!!! aux_get(): ebuild for 'net-www/resin-resin-3.0.8' does not exist at:
!!!            /usr/portage/net-www/resin-resin/resin-resin-3.0.8.ebuild
Error - Can't find ebuild for net-www/resin

Give the category and ebuild name in this format:
bumper games-arcade/pacman-0.1 0.2
What's with the '/usr/portage/net-www/resin-resin/resin-resin-3.0.8.ebuild'? Shouldn't it be '/usr/portage/net-www/resin/resin-3.0.8.ebuild'?
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
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Tue Sep 14, 2004 3:51 am

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: Select all

( floam@Aluminium ~ ) emerge -puD world
!!! Invalid PORTDIR_OVERLAY (not a dir): /usr/local/overlays/personal/:/usr/local/overlays/public
Thanks, changed to space.
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Tue Sep 14, 2004 3:54 am

JasonRogers, sorry, guess I should watch my own threads. I fixed the typo in the latest version:

http://dev.gentoo.org/~pythonhead/bumper/bumper-0.0.8

As for the second problem, I'm not sure what happened, but you may have been caught when they were changing categories? I see resin is in www-servers now, not net-www.
Top
Post Reply

32 posts
  • 1
  • 2
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic