Mailinglist Archive: opensuse-buildservice (156 mails)

< Previous Next >
[opensuse-buildservice] Package download for local build from local source (e.g. DVD)
  • From: Stefan Brüns <lurch@xxxxxx>
  • Date: Sat, 5 Aug 2006 12:52:36 +0200
  • Message-id: <200608051252.37164.lurch@xxxxxx>
Hi,

as I have a very slow connection at the moment, and wanted to try the local
build introduced recently, I have patched my osc to use a local directory as
a package source.

Patch is attached.

remarks:
The files will be symlinked, if they are available locally, and downloaded
otherwise. To copy the files to the cache even for local files, change
the "copy_local" flag from the default of "0" to "1" (usefull for DVDs, which
are not in the drive all the time).

Greetings,

Stefan

PS: I wanted to put this into bugzilla, but there was no Buildservice
component ...
--- fetch.py 2006-07-29 23:02:03.000000000 +0200
+++ fetch.py_new 2006-07-29 23:01:45.000000000 +0200
@@ -44,6 +44,7 @@
authhandler = urllib2.HTTPBasicAuthHandler(passmgr)
self.gr = URLGrabber(user_agent=__user_agent__,
keepalive=1,
+ copy_local=0,
opener = urllib2.build_opener(authhandler),
progress_obj=self.progress_obj,
failure_callback=(self.failureReport,(),{}),
@@ -72,6 +73,8 @@
ret = mg.urlgrab(pac.filename,
filename=pac.fullfilename,
text = '(%s) %s' %(pac.project, pac.filename))
+ if ret != pac.fullfilename:
+ os.symlink(ret,pac.fullfilename)

except URLGrabError, e:
print
@@ -101,6 +104,9 @@
#print 'cached:', i.fullfilename
pass
else:
+ if os.path.islink(os.path.join(i.localdir, i.fullfilename)):
+ os.unlink(os.path.join(i.localdir, i.fullfilename))
+
self.dirSetup(i)

try:
--- build.py 2006-07-17 15:53:17.000000000 +0200
+++ build.py_new 2006-07-29 23:08:18.000000000 +0200
@@ -207,6 +207,14 @@
# rootdir to setup the chroot environment
#build-root: /var/tmp/build-root

+# default list of download URLs, which will be tried in order
+#urllist:
+## the normal repo server, redirecting to mirrors
+# http://software.opensuse.org/download/%(project)s/%(repository)s/%(arch)s/%(filename)s,
+## direct access to "full" tree
+# http://api.opensuse.org/rpm/%(project)s/%(repository)s/_repository/%(buildarch)s/%(name)s,
+## mounted distribution dvd
+# file:///media/dvd/suse/%(arch)s/%(filename)s

[%s]
user: %s
< Previous Next >
This Thread
  • No further messages