LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-13-2007, 12:47 PM   #1
xri
Member
 
Registered: Aug 2002
Distribution: Slackware 14.1, Archlinux
Posts: 273
Blog Entries: 10

Rep: Reputation: 32
slackpkg does not recognize mirrors


I used slackpkg on a prior version and it worked great. This time I did this:
  1. I installed Slack 12.0 from scratch and just slackpkg.
  2. I tested most of the mirrors uncommenting one individually each time, both using the version 11.0 mirror, and also changing it to 12.0.

I always get this message after slackpkg update

Quote:
You do not have any mirror selected in /etc/slackpkg/mirrors
Please edit that file and uncomment ONE mirror. Slackpkg
only works with ONE mirror selected.
What should I do to make it work? (It worked fine the last time I used it with Slack 10.2)

Your comments will be appreciated.
 
Old 10-13-2007, 12:55 PM   #2
tuubaaku
Member
 
Registered: Oct 2004
Distribution: Slackware, Scientific Linux
Posts: 103

Rep: Reputation: 15
Works great for me. Maybe post your mirrors file? Which one do you have selected? You could at least post that line.
 
Old 10-13-2007, 04:06 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,379

Rep: Reputation: Disabled
That slackpkg comment looks like it tells you exactly what to do. What part is not clear to you?

Eric
 
Old 10-13-2007, 09:04 PM   #4
xri
Member
 
Registered: Aug 2002
Distribution: Slackware 14.1, Archlinux
Posts: 273
Blog Entries: 10

Original Poster
Rep: Reputation: 32
Quote:
Your comments will be appreciated.
When I wrote this I meant intelligent and civil comments.
Here is my original post:
Quote:
I used slackpkg on a prior version and it worked great. This time I did this:
  1. I installed Slack 12.0 from scratch and just slackpkg.
  2. I tested most of the mirrors uncommenting one individually each time, both using the version 11.0 mirror, and also changing it to 12.0
Don't you think that, if I used slackpakg on a prior version, I know how to uncomment a line on a file?
What part of my post is not clear to you?
Thanks anyway.
 
Old 10-14-2007, 12:10 AM   #5
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Slackpkg is trying to tell you that only ONE mirror can be uncommented. What part of *that* is unclear to you?

This should reveal the problem:
Code:
grep -v ^# /etc/slackpkg/mirrors
 
Old 10-14-2007, 01:16 AM   #6
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
xri, you probably should just post the mirrors file, just to satisfy the cynical

and be sure to run the command that rworkman put up, simple and useful. You never know, you might have made a mistake .....

Quote:
When I wrote this I meant intelligent and civil comments.
aww, comeon it isn't that rude or anything. The obvious solution is usually the correct one, even if it seems really dumb.

Eric and Robby are both contributors to slackware. I can assure you that if you actually do have a genuine problem, no one would work harder than both of them to resolve it.
 
Old 10-14-2007, 09:27 PM   #7
xri
Member
 
Registered: Aug 2002
Distribution: Slackware 14.1, Archlinux
Posts: 273
Blog Entries: 10

Original Poster
Rep: Reputation: 32
Sorry if my tone above on was not my usual. Actually, I was sleep deprived and didn't pay much attention on the member's name. Now I remember seeing the 'Alien Bob' moniker many times on helpful posts. My apologies.

Regarding slackpkg,

Quote:
bash-3.1$ grep -v ^# /etc/slackpkg/mirrors


http://slackware.mirrors.tds.net/pub...lackware-12.0/

Worth noting, this is only one of many mirrors I chose successively, one mirror only each time. Initially, I tested the mirrors with the original 11.0 part, and then changed the links to 12.0 to conform to my Slack version.
I have not touched the configuration file or the blacklist.

Quote:
The obvious solution is usually the correct one, even if it seems really dumb.
This is probably true. I might be missing something really simple this time.
 
Old 10-14-2007, 10:09 PM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
xri:
What slackpkg version are you using?

First, let's look at /usr/sbin/slackpkg in slackpkg-2.61:
Lines 39 and 40
Code:
CONF=/etc/slackpkg
SOURCE=`grep -e "^\([a-z]\)" $CONF/mirrors`
Looking at /usr/libexec/slackpkg/core-functions.sh of slackpkg-2.61:
Lines 80-97
Code:
        # Checking if /etc/slackpkg/mirrors are in correct syntax.
        #                                                         
        if [ "$SOURCE" = "" ]; then
                echo -e "\
\nYou do not have any mirror selected in ${CONF}/mirrors\n\
Please edit that file and uncomment ONE mirror.  Slackpkg\n\
only works with ONE mirror selected.\n"
                cleanup
        else
                COUNT=`echo $SOURCE | wc -w | tr -d " "`
                if [ "$COUNT" != "1" ]; then
                        echo -e "\n\
Slackpkg only works with ONE mirror selected.  Please edit your\n\
${CONF}/mirrors and comment all but one line - two or more\n\
mirrors uncommented is not valid syntax.\n"
                        cleanup
                fi
        fi
Based on your error message, slackpkg is not detecting the uncommented mirror.
Try this (to replicate the exact command used by slackpkg):
Code:
grep -e "^\([a-z]\)" /etc/slackpkg/mirrors
What does that show?
 
Old 10-15-2007, 04:56 PM   #9
xri
Member
 
Registered: Aug 2002
Distribution: Slackware 14.1, Archlinux
Posts: 273
Blog Entries: 10

Original Poster
Rep: Reputation: 32
Talking

I can see what you mean. The variable SOURCE is empty, because

grep -e "^\([a-z]\)" /etc/slackpkg/mirrors gives me no output.

although the files and lines you showed are identical on my system (Slack 12.0 and slackpkg slackpkg-2.61).


After a 15-minute crash course on regular expressions, I replaced line 40 on /usr/sbin/slackpkg with

Quote:
SOURCE=`grep -e ^[^#] $CONF/mirrors`
Then I was able to run slackpkg update for the first time.


Thanks a lot!!


This is why I love Linux.
 
Old 10-15-2007, 05:11 PM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Okay, well, I'm glad it's fixed. I've pinged PiterPunk (slackpkg author) about this. Thanks for the followup and fix. :-)
 
Old 10-15-2007, 08:23 PM   #11
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
xri:
For debugging purposes, your exact /etc/slackpkg/mirrors file is needed.
Can you mail it to PiterPunk: piterpunk [At] slackware.com
and CC me: rworkman [At] slackware.com
 
Old 10-16-2007, 09:47 AM   #12
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
hahaha man who would have thought .. a problem in the regex ....

and robby I bow to thee .. for being smart enough to see the slackpkg scripts ... I generally assume that the scripts set by a program to be error free , would have never guessed that the slackpkg script would be at error ...
 
Old 10-16-2007, 10:11 AM   #13
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Well, it's a bug somewhere, but I'm not sure where. Neither I nor PiterPunk have been able to reproduce the error, even trying various combinations of blank lines (no comment marks). That's why we need the actual unmodified mirrors file.
 
Old 10-20-2007, 10:19 PM   #14
xri
Member
 
Registered: Aug 2002
Distribution: Slackware 14.1, Archlinux
Posts: 273
Blog Entries: 10

Original Poster
Rep: Reputation: 32
Hi guys. Sorry for the delay to respond. I haven't been around my computer for a long time. Of course I'll email you my mirrors file and provide any further information about my system if needed. Thanks for your insight about this issue. I'll take my lesson home and apply a similar approach for future problems.

This is a great community.
 
Old 10-24-2007, 02:30 PM   #15
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Okay, I've got the mirrors file, and I see the problem. Here's what the mirrors file has:
Code:
#ftp://slackware.mirrors.pair.com/slackware-11.0/
#USA, 1Gbit
 http://slackware.mirrors.tds.net/pub/slackware/slackware-12.0/
#ftp://slackware.mirrors.tds.net/pub/slackware/slackware-11.0/
#USA, 10Mbit
Note the blank space before the uncommented mirror.
The slackpkg code that finds uncommented mirrors is only looking at the first character of the line.
 
  


Reply

Tags
slackpkg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackpkg? Frank Soranno Slackware 3 06-02-2007 01:12 AM
slackpkg bookie Linux - Newbie 22 05-31-2007 10:49 AM
Slackpkg: missing something in /usr/libexec/slackpkg/functions.d/dialog-functions.sh michelino Slackware 4 03-20-2007 01:22 PM
slackpkg moob8 Slackware 1 10-01-2006 04:46 AM
how do i go about editing /etc/slackpkg/mirrors ? Draconian Slackware 2 08-19-2004 03:04 AM


All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration