From Fedora Project Wiki

Line 39: Line 39:
* to get the client code for developing a test locally:
* to get the client code for developing a test locally:
** lmr recommends git cloning (in rpm form: yum install autotest-framework , but, when I tried this it broke the git clone. pick one or the other)
** lmr recommends git cloning (in rpm form: yum install autotest-framework , but, when I tried this it broke the git clone. pick one or the other)
<pre>
[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control
13:11:17 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 995, in __init__
    self._initialize_dir_properties()
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1049, in _initialize_dir_properties
    self._tmpdir = readwrite_dir(tests_out_dir, 'tmp')
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1023, in readwrite_dir
    return self._job_directory(os.path.join(*args), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable
[lmr@thinkpad-t420s autotest]$ sudo rm -rf /home/lmr/Code/autotest.git/autotest/client/tmp/
[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control
13:11:29 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 997, in __init__
    self._find_resultdir(*args, **dargs), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
</pre>

Revision as of 19:13, 20 January 2013

Getting at files from koji's lookaside

$ cat /etc/rpkg/fedpkg.conf
[fedpkg]
lookaside = http://pkgs.fedoraproject.org/repo/pkgs
lookasidehash = md5
lookaside_cgi = https://pkgs.fedoraproject.org/repo/pkgs/upload.cgi
gitbaseurl = ssh://%(user)s@pkgs.fedoraproject.org/%(module)s
anongiturl = git://pkgs.fedoraproject.org/%(module)s
tracbaseurl = https://%(user)s:%(password)s@fedorahosted.org/rel-eng/login/xmlrpc
branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$
kojiconfig = /etc/koji.conf
build_client = koji

From /usr/lib/python2.7/site-packages/pyrpkg/__init__.py's sources() method:

           self.log.info("Downloading %s" % (file))
           url = '%s/%s/%s/%s/%s' % (self.lookaside, self.module_name,
                                     file.replace(' ', '%20'),
                                     csum, file.replace(' ', '%20'))

So e.g. the line from "sources":

    676dc96593362b7b0aa54fea0c8e744c  pygobject-3.3.4.tar.xz

Giving e.g. this link: http://pkgs.fedoraproject.org/repo/pkgs/pygobject3/pygobject-3.3.4.tar.xz/676dc96593362b7b0aa54fea0c8e744c/pygobject-3.3.4.tar.xz

Dave's autotest notes

[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control 
13:11:17 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 995, in __init__
    self._initialize_dir_properties()
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1049, in _initialize_dir_properties
    self._tmpdir = readwrite_dir(tests_out_dir, 'tmp')
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1023, in readwrite_dir
    return self._job_directory(os.path.join(*args), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable

[lmr@thinkpad-t420s autotest]$ sudo rm -rf /home/lmr/Code/autotest.git/autotest/client/tmp/
[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control 
13:11:29 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 997, in __init__
    self._find_resultdir(*args, **dargs), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable