LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   src2pkg (http://www.linuxquestions.org/questions/slackware-14/src2pkg-695202/)

macondo 01-05-2009 07:35 PM

src2pkg
 
This is a great little app, works flawlessly but for a minor detail, at the end when the .tgz is placed in /tmp and i try to install it with 'installpkg' as root, and put the first 3-4 letters of the app to be installed and press TAB to autocomplete the name it just does part of it. I have to enter the rest manually, otherwise, it gives an error saying the app does not end in .tgz when in reality it does. Is this small bug? Thanks.

mRgOBLIN 01-05-2009 07:43 PM

probably it's finding the build directory like /tmp/foo-1.2.3 and /tmp/foo-1.2.3-noarch-1.tgz

If you try typing the dash or the next letter or two does the tab then finish the completion?

P.S I never used src2pkg so I may be way off base here :)

bgeddy 01-05-2009 08:15 PM

Quote:

src2pkg
This is a great little app, works flawlessly but for a minor detail, at the end when the .tgz is placed in /tmp and i try to install it with 'installpkg' as root, and put the first 3-4 letters of the app to be installed and press TAB to autocomplete the name it just does part of it. I have to enter the rest manually, otherwise, it gives an error saying the app does not end in .tgz when in reality it does. Is this small bug? Thanks.
Sounds like what you seeing is Bash shell behavior and nothing to do with src2pkg. It may well be that the package has been built in the /tmp directory in a sundirectory named after the package's basename so there is more than one directory entry matching.

What happens if you hit tab twice after keying in the start characters ?

Another way may be, for example, if the package is created at /tmp/tunctl-1.5-i486-1_SBo.tgz, would be to run as root "installpkg /tmp/tunctl*.tgz" and let the shell glob the results.

Sorry if this is way off the mark - just some ideas !!

gnashley 01-06-2009 03:46 AM

mRgOBLIN and bgeddy are right on the mark. By default, src2pkg creates temporary working directories unser /tmp and also leaves the finished package there -the same way that a SlackBuild would do it by default. And the name of temp dirs created for the sources and package tree both start the same as the finished package.
Using the foo-1.2.3 example, the sources are in /tmp/foo-1.2.3-src-1, the package tree is in /tmp/foo-1.2.3-pkg-1 and the package, of course, would be /tmp/foo-1.2.3-i486-1.tgz
'installpkg /tmp/foo*.tgz' should work.

For convenience, you might want to change the setting for PKG_DEST_DIR in your /etc/src2pkg/src2pkg.conf file to this:
PKG_DEST_DIR=$CWD
That will always place the finished package in the same directory where you run src2pkg from. (There is already such a line in the conf file -you can simply uncomment it)

macondo 01-06-2009 01:21 PM

Thank you all :)

SqdnGuns 01-06-2009 01:36 PM

Quote:

Originally Posted by gnashley (Post 3398564)
mRgOBLIN and bgeddy are right on the mark. By default, src2pkg creates temporary working directories unser /tmp and also leaves the finished package there -the same way that a SlackBuild would do it by default. And the name of temp dirs created for the sources and package tree both start the same as the finished package.
Using the foo-1.2.3 example, the sources are in /tmp/foo-1.2.3-src-1, the package tree is in /tmp/foo-1.2.3-pkg-1 and the package, of course, would be /tmp/foo-1.2.3-i486-1.tgz
'installpkg /tmp/foo*.tgz' should work.

For convenience, you might want to change the setting for PKG_DEST_DIR in your /etc/src2pkg/src2pkg.conf file to this:
PKG_DEST_DIR=$CWD
That will always place the finished package in the same directory where you run src2pkg from. (There is already such a line in the conf file -you can simply uncomment it)

Does this need to be updated in the WiKi?

Compatibility with Slackware versions

src2pkg has been tested and works with the stable releases of Slackware 11.0 and 12.0.

I have not tried this yet but might give it a shot.

Thanks

gnashley 01-06-2009 02:22 PM

Ummm, I don't think it needs to be updated in the wiki -I mean the default behaviour has been the same for quite a long while now. You can also override the PKG_DEST_DIR from the command line by using the '-C' option with src2pkg or by running it like this:
PKG_DEST_DIR=/path/to/dir src2pkg OPTIONS tarball-name
In the case of the current dir you could use:
PKG_DEST_DIR=$(pwd) src2pkg OPTIONS tarball-name
to do the same thing.

Alien_Hominid 01-06-2009 04:30 PM

He probably meant to 12.2 ;)

gnashley 01-06-2009 05:02 PM

Oh, I see! Yeah, he's right then. Pretty soon there is gonna be a new release and there will several things that need updating.

MannyNix 01-06-2009 11:17 PM

Since we have the excellent slackbook, why not use it?
Read 8.3.2 Tab Completion Nice read, I think you'll enjoy it.
Greetings

hitest 01-06-2009 11:23 PM

Quote:

Originally Posted by gnashley (Post 3399241)
Oh, I see! Yeah, he's right then. Pretty soon there is gonna be a new release and there will several things that need updating.

Sounds good, man. :) I appreciate the good work you do for our community! :cool:

SqdnGuns 01-07-2009 01:20 AM

Quote:

Originally Posted by Alien_Hominid (Post 3399199)
He probably meant to 12.2 ;)

Yup.......... ;)


All times are GMT -5. The time now is 10:56 PM.