Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 8 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 27, 2014
@gapan Bump version to 14.1 d9b4a4a
@gapan Bump repo version to 13.37
13.37 is the last version that this script is used anyway
949be7a
@gapan Add support for optional non-hidden scripts
If non-hidden scripts are found, prefer those instead. Should help with
testing.
b76a6b8
@gapan Bump version to 14.1 c37e991
@gapan Add comments at the top of the file
Add comments at the top of the file, explaining what it does briefly.
8e06e72
@gapan Add scripts to add deps and replace SlackBuilds
Add sb_adddeps script that adds new dependencies to the REQUIRES list of
SlackBuilds. For example, add "qt" as a dependency to skype.

Add sb_replace script that replaces SlackBuild names with new names, in
case the package is already present in Salix repos, but is named
differently. For example "configobj" and "python-configobj".

In sb_dupes_req, also exclude all SlackBuilds in the SBoREPLACE list.
79f3e0b
@gapan Add SBoADD and SBoREPLACE lists 491eb05
@gapan Merge branch 'master' of github.com:gapan/repo-scripts 1d426c1
Showing with 155 additions and 12 deletions.
  1. +2 −0 sbo/SBoADD
  2. +4 −0 sbo/SBoREPLACE
  3. +46 −0 sbo/sb_adddeps
  4. +21 −6 sbo/sb_dupes_req
  5. +40 −0 sbo/sb_replace
  6. +41 −5 sbo/sync.sh
  7. +1 −1 slackware/adddepinfo.sh
View
2 sbo/SBoADD
@@ -0,0 +1,2 @@
+minitube: qt
+skype: qt
View
4 sbo/SBoREPLACE
@@ -0,0 +1,4 @@
+Mako: python-mako
+configobj: python-configobj
+jdk: openjdk
+mechanize: python-mechanize
View
46 sbo/sb_adddeps
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+# This script adds extra dependencies to the SLACKBUILDS.TXT file, based
+# on the SBoADDEPS file.
+#
+# NOT FINISHED YET
+
+VERSION='14.1'
+
+SBOADD='SBoADD'
+SBO='SLACKBUILDS.TXT.SBo'
+SBONEW=SBO+'.NEW'
+
+d = dict()
+f = open(SBOADD)
+for line in f:
+ pkg, sep, deps = line.partition(':')
+ pkg = pkg.strip(' ')
+ deps = deps.rstrip('\n').strip(' ')
+ d[pkg]=deps
+f.close()
+
+f = open(SBO)
+fn = open(SBONEW, 'w')
+sb=''
+for line in f:
+ if line.startswith('SLACKBUILD NAME:'):
+ req = ''
+ sb = line.partition('SLACKBUILD NAME:')[2].lstrip(' ').rstrip(' \n')
+ if line.startswith('SLACKBUILD REQUIRES:'):
+ req = line.partition('SLACKBUILD REQUIRES:')[2].lstrip(' ').rstrip(' \n')
+ if req != '':
+ if sb in d:
+ newreq = req+','+d[sb]
+ else:
+ newreq = req
+ else:
+ if sb in d:
+ newreq = d[sb]
+ else:
+ newreq = ''
+ fn.write('SLACKBUILD REQUIRES: '+newreq+'\n')
+ else:
+ fn.write(line)
+f.close()
+fn.close()
View
27 sbo/sb_dupes_req
@@ -1,11 +1,18 @@
#!/usr/bin/env python
-VERSION='14.0'
+# This script checks which packages are available in the Salix
+# binary package repositories, or available in the SLKBUILD repository
+# and removes them from the SLACKBUILDS list.
+# It also adds dependency information to the SLACKBUILDS.TXT file, based
+# on the REQUIRES lines in the .info files in the SBo repository.
+
+VERSION='14.1'
PKG='../../i486/'+VERSION+'/PACKAGES.TXT'
SLKBUILD='../../slkbuild/'+VERSION+'/SLACKBUILDS.TXT'
SBOEXCLUDE='SBoEXCLUDE'
-SBO='SLACKBUILDS.TXT'
+SBOREPLACE='SBoREPLACE'
+SBO='SLACKBUILDS.TXT.SBo'
SBONEW=SBO+'.NEW'
f = open(PKG)
@@ -29,6 +36,12 @@ for line in f:
packages.append(pkg)
f.close()
+f = open(SBOREPLACE)
+for line in f:
+ pkg = line.partition(':')[0].strip(' ')
+ packages.append(pkg)
+f.close()
+
f = open(SBO)
fn = open(SBONEW, 'w')
match = False
@@ -50,10 +63,12 @@ for line in f:
freq.close()
except IOError:
print sb+': info not found'
- if line.startswith('SLACKBUILD SHORT DESCRIPTION:'):
- if req != '':
- fn.write('SLACKBUILD REQUIRES: '+req+'\n')
if match is not True:
- fn.write(line)
+ if line.startswith('SLACKBUILD SHORT DESCRIPTION:'):
+ if req != '':
+ fn.write('SLACKBUILD REQUIRES: '+req+'\n')
+ else:
+ fn.write('SLACKBUILD REQUIRES: \n')
+ fn.write(line)
f.close()
fn.close()
View
40 sbo/sb_replace
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+# This script replaces mentions of SlackBuilds with a new name in the
+# REQUIRES lines. For example, it can replace all instances of
+# "configobj" with "python-configobj"
+
+VERSION='14.1'
+
+SBOREPLACE='SBoREPLACE'
+SBO='SLACKBUILDS.TXT.SBo'
+SBONEW=SBO+'.NEW'
+
+d = dict()
+f = open(SBOREPLACE)
+for line in f:
+ name, sep, new_name = line.partition(':')
+ name = name.strip(' ')
+ new_name = new_name.rstrip('\n').strip(' ')
+ d[name]=new_name
+f.close()
+
+f = open(SBO)
+fn = open(SBONEW, 'w')
+for line in f:
+ if line.startswith('SLACKBUILD REQUIRES:'):
+ reqline = line.partition('SLACKBUILD REQUIRES:')[2].lstrip(' ').rstrip(' \n')
+ reqlist = reqline.split(',')
+ new_reqs = ''
+ for req in reqlist:
+ if req != '':
+ if req in d:
+ new_reqs = new_reqs+d[req]+','
+ else:
+ new_reqs = req+','
+ new_reqs = new_reqs.rstrip(',')
+ fn.write('SLACKBUILD REQUIRES: '+new_reqs+'\n')
+ else:
+ fn.write(line)
+f.close()
+fn.close()
View
46 sbo/sync.sh
@@ -1,13 +1,49 @@
#!/bin/sh
-VERSION="14.0"
+VERSION="14.1"
-rsync -av --delete --exclude '.sync.sh' --exclude '.sb_dupes_req' \
+DIR="/var/www/vhosts/salix.enialis.net/pages/sbo/$VERSION"
+
+rsync -av --delete \
+ --exclude '.sync.sh' \
+ --exclude 'sync.sh' \
+ --exclude '.sb_dupes_req' \
+ --exclude 'sb_dupes_req' \
--exclude 'SBoEXCLUDE' \
+ --exclude '.sb_adddeps' \
+ --exclude 'sb_adddeps' \
+ --exclude 'SBoADD' \
+ --exclude '.sb_replace' \
+ --exclude 'sb_replace' \
+ --exclude 'SBoREPLACE' \
+ --exclude 'SLACKBUILDS.TXT' \
+ --exclude 'SLACKBUILDS.TXT.gz' \
rsync://slackbuilds.org/slackbuilds/$VERSION/ \
- /var/www/vhosts/salix.enialis.net/pages/sbo/$VERSION
+ $DIR
+
+rsync -av \
+ rsync://slackbuilds.org/slackbuilds/$VERSION/SLACKBUILDS.TXT \
+ $DIR/SLACKBUILDS.TXT.SBo
-./.sb_dupes_req
-mv SLACKBUILDS.TXT.NEW SLACKBUILDS.TXT
+# use the hidden file only when a non-hidden file is not there
+if [ -x ./sb_dupes_req ]; then
+ ./sb_dupes_req
+else
+ ./.sb_dupes_req
+fi
+mv SLACKBUILDS.TXT.SBo.NEW SLACKBUILDS.TXT.SBo
+if [ -x ./sb_adddeps ]; then
+ ./sb_adddeps
+else
+ ./.sb_adddeps
+fi
+mv SLACKBUILDS.TXT.SBo.NEW SLACKBUILDS.TXT.SBo
+if [ -x ./sb_replace ]; then
+ ./sb_replace
+else
+ ./.sb_replace
+fi
+rm -f SLACKBUILDS.TXT.SBo
+mv SLACKBUILDS.TXT.SBo.NEW SLACKBUILDS.TXT
cat SLACKBUILDS.TXT | gzip > SLACKBUILDS.TXT.gz
View
2 slackware/adddepinfo.sh
@@ -27,7 +27,7 @@
# Licensed under the GPLv3
#
-SLACKREPO="http://ftp.gwdg.de/pub/linux/slackware/slackware-13.1/"
+SLACKREPO="http://ftp.gwdg.de/pub/linux/slackware/slackware-13.37/"
#SLACKREPO="ftp://ftp.osuosl.org/pub/slackware/slackware-13.1/"
EXCLUDE=" arts k3b3 kdelibs3 qca-tls1 qca1 qt3 tightvnc "

No commit comments for this range

Something went wrong with that request. Please try again.