<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>263392</bug_id>
          
          <creation_ts>2023-10-19 12:46:19 -0700</creation_ts>
          <short_desc>[AutoInstall] Wheel unpack deletes directory rather than just unpacking</short_desc>
          <delta_ts>2024-12-04 15:41:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=263119</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=263589</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>284072</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sam Sneddon [:gsnedders]">gsnedders</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfan2</cc>
    
    <cc>jbedard</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1986216</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2023-10-19 12:46:19 -0700</bug_when>
    <thetext>Per https://packaging.python.org/en/latest/specifications/binary-distribution-format/#installing-a-wheel-distribution-1-0-py32-none-any-whl, we should just be unpacking the archive.

However, currently, for each file in the wheel, we:

    for directory in to_be_moved:
        shutil.rmtree(os.path.join(AutoInstall.directory, directory), ignore_errors=True)
        shutil.move(os.path.join(temp_location, directory), AutoInstall.directory)

(https://github.com/WebKit/WebKit/blob/723eb83c4fdb24e0d50c664452328dc6188ca7dd/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py#L400-L402)

This means that when we unpack autobahn (20.7.1), which contains:

gsnedders@gsnedders-marsha ~ % grep &apos;^twisted&apos; &apos;/var/folders/qk/hmjj9_lx2cg3_4v3vx3y7y_w0000gn/T/autobahn-77395/autobahn-20.7.1.dist-info/RECORD&apos;
twisted/plugins/autobahn_endpoints.py,sha256=6XClHTi8llFb6p6iKE3npCYGlNwJZwCcs3fSc2knE0c,6349
twisted/plugins/autobahn_twistd.py,sha256=9mccXpFlai3XpoYHAtxAynedzogaLb6XM7-Qb9IF5yQ,1566

…we end up deleting all of twisted, rather than just unpacking these files into the twisted package.

(This is the cause of some of the failures on bug 263119.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986217</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-10-19 12:46:40 -0700</bug_when>
    <thetext>&lt;rdar://problem/117220777&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>