{"record":{"id":"b08a3f515b1ac9a2","repo":"rustdesk/rustdesk","slug":"could-not-retarget-path-to-the-drm-variant-upst","errorCode":null,"errorMessage":"could not retarget {path} to the drm variant; upstream control layout changed","messagePattern":"could not retarget (.+?) to the drm variant; upstream control layout changed","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"build.py","lineNumber":694,"sourceCode":"    print(f'[drm] {DRM_PACKAGE_NAME} libc6 floor measured at {floor}')\n    with open(path) as f:\n        lines = f.readlines()\n    out = []\n    for line in lines:\n        if line.startswith('Package: rustdesk'):\n            out.append(f'Package: {DRM_PACKAGE_NAME}\\n')\n            out.append('Conflicts: rustdesk\\nReplaces: rustdesk\\nProvides: rustdesk\\n')\n        elif line.startswith('Depends:'):\n            # 2.4.101 is where drmModeGetFB2 landed; below it libdrmtap loads and can never capture.\n            out.append(line.rstrip('\\n') + ', libdrm2 (>= 2.4.101), libegl1, libgles2, '\n                       f'libc6 (>= {floor})\\n')\n        else:\n            out.append(line)\n    body = ''.join(out)\n    # Fail loudly rather than silently shipping a package that says `rustdesk`: a stock control file\n    # that stopped matching either anchor would otherwise produce a variant deb wearing the stock name.\n    if f'Package: {DRM_PACKAGE_NAME}\\n' not in body or 'libegl1' not in body:\n        raise Exception(f'could not retarget {path} to the drm variant; upstream control layout changed')\n    with open(path, 'w') as f:\n        f.write(body)\n\n\ndef build_flutter_deb(version, features):\n    if not skip_cargo:\n        system2(f'cargo build --locked --features {features} --lib --release')\n        ffi_bindgen_function_refactor()\n    os.chdir('flutter')\n    system2('flutter build linux --release')\n    system2('mkdir -p tmpdeb/usr/bin/')\n    system2('mkdir -p tmpdeb/usr/share/rustdesk')\n    system2('mkdir -p tmpdeb/etc/rustdesk/')\n    system2('mkdir -p tmpdeb/etc/pam.d/')\n    system2('mkdir -p tmpdeb/usr/share/rustdesk/files/systemd/')\n    system2('mkdir -p tmpdeb/usr/share/icons/hicolor/256x256/apps/')\n    system2('mkdir -p tmpdeb/usr/share/icons/hicolor/scalable/apps/')\n    system2('mkdir -p tmpdeb/usr/share/applications/')","sourceCodeStart":676,"sourceCodeEnd":712,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/7aa98d43cf1962a7a29ec16ffef42974377ef11e/build.py#L676-L712","documentation":"Error \"could not retarget {path} to the drm variant; upstream control layout changed\" thrown in rustdesk/rustdesk.","triggerScenarios":"Thrown at build.py:694 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7aa98d43cf1962a7a29ec16ffef42974377ef11e","analyzedAt":"2026-08-16T06:17:34.842Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}